﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using System.Xml.Serialization;
using Microsoft.Xna.Framework.Graphics;
using Urbania.GUI.Elements;
using Urbania.Utilities;


namespace Urbania.GUI
{
    class HUD
    {
        HUDElement happySprite { get; set; }
        HUDElement populationSprite { get; set; }
        HUDElement scoreSprite { get; set; }
        HUDElement monniesSprite { get; set; }
        HUDElement approvalSprite { get; set; }
        HUDElement pollutionSprite { get; set; }
        HUDElement bureaucracySprite { get; set; }
        HUDElement FoodSprite { get; set; }
        HUDElement LowerBG { get; set; }
        HUDElement UpperBG { get; set; }

        public HUD(HUDElement happySprite, HUDElement scoreSprite, HUDElement monniesSprite,
            HUDElement approvalSprite, HUDElement pollutionSprite, HUDElement bureaucracySprite, 
            HUDElement FoodSprite, HUDElement populationSprite, HUDElement LowerBG, HUDElement UpperBG)
        {
            this.happySprite = happySprite;
            this.populationSprite = populationSprite;
            this.scoreSprite = scoreSprite;
            this.monniesSprite = monniesSprite;
            this.approvalSprite = approvalSprite;
            this.pollutionSprite = pollutionSprite;
            this.bureaucracySprite = bureaucracySprite;
            this.FoodSprite = FoodSprite;
            this.LowerBG = LowerBG;
            this.UpperBG = UpperBG;
        }

        public void Draw(string score, string money, string pollution, string bureaucracy, string food, Texture2D happySpriteImage, string approvalRating, string population, Texture2D backgroundBar)
        {
            LowerBG.drawBG(backgroundBar);
            UpperBG.drawBG(backgroundBar);
            this.happySprite.drawPicture(happySpriteImage);
            this.scoreSprite.drawValue(score);
            this.monniesSprite.drawValue(money);
            this.approvalSprite.drawValue(approvalRating);
            this.pollutionSprite.drawValue(pollution);
            this.bureaucracySprite.drawValue(bureaucracy);
            this.FoodSprite.drawValue(food);
            this.populationSprite.drawValue(population);
        }

       /* public void updateHUD(Utilities.Camera camera){
            this.happySprite.pos = new Vector2(5, 5);//happy
            this.scoreSprite.pos =      new Vector2(3 * (Game.GraphicsDevice.Viewport.Width) / 4, 5);//score
            this.monniesSprite.pos =    new Vector2(2 * (Game.GraphicsDevice.Viewport.Width) / 4, 5);//money
            this.approvalSprite.pos =   new Vector2(Game.GraphicsDevice.Viewport.Width / 4, 5);//approval
            this.pollutionSprite.pos =  new Vector2(2 * (Game.GraphicsDevice.Viewport.Width) / 4, Game.GraphicsDevice.Viewport.Height - 25);//pollution
            this.bureaucracySprite.pos= new Vector2(Game.GraphicsDevice.Viewport.Width / 4, Game.GraphicsDevice.Viewport.Height - 25);//bureaucracy
            this.FoodSprite.pos =       new Vector2(5, Game.GraphicsDevice.Viewport.Height - 25);//food
            this.populationSprite.pos = new Vector2(3 * (Game.GraphicsDevice.Viewport.Width) / 4, Game.GraphicsDevice.Viewport.Height - 25);//population
            this.LowerBG.pos =          new Vector2(0, Game.GraphicsDevice.Viewport.Height - 25);
            this.UpperBG.pos =          new Vector2(0, 0);
        }
        * */
    }
}
